<template>
  <div id="app" >
    <router-view/>
    <e-footer v-if="foo"/>
    <div v-gotop="600"/> <!--返回顶部-->
  </div>
</template>
<script>
import Vue from "vue";
// Vue.directive('toast', (binding)=>{
//   const Toast =  Vue.$toast('内容')
//   console.log(binding)
//   if(binding.value){
//     Toast.clear();
//   }
// })

Vue.component('e-footer',()=>import('@/components/e-footer'))
import { mapState } from 'vuex'
export default {
  data () {
    return {
    }
  },
  computed: {
    ...mapState(['foo'])
  },
  methods: {
  },
  mounted() {


    /*因为搜索需要cookie 直接设置cookie*/
    const setCookie = [
      {
        name: 'PHPSESSID',
        value: 'xh',
        Expires: 'Session'
      },
      {
        name: 'Webstorm-c272da7a',
        value: '03ca53dd-fd5a-4f99-935e-c4e279f92b21',
        Expires: '2030-02-10T07:16:15.288Z'
      },
      {
        name: 'acw_tc',
        value: '76b20fe115826449774402485e1a87d1fcadcbba40783ddcfcb7c49cb779ca',
        Expires: '2020-03-27T15:36:18.684Z'
      },
      {
        name: 'acw_tc',
        value: '76b20fe115826449774402485e1a87d1fcadcbba40783ddcfcb7c49cb779ca',
        Expires: '2020-03-27T15:36:18.684Z'
      },
      {
        name: 'device_platform',
        value: 'android',
        Expires: '2020-04-05T08:04:08.000Z'
      },
      {
        name: 'has_download',
        value: '1',
        Expires: '2020-04-05T08:04:08.000Z'
      },
      {
        name: 'referer_site',
        value: 'wap_touch_',
        Expires: '2020-04-05T08:04:08.000Z'
      },
      {
        name: 'referer_site_cps',
        value: 'wap_touch_',
        Expires: '2020-04-05T08:04:08.000Z'
      },
      {
        name: 'route',
        value: '6cf9ffe4014f0bf241681c1db92a3674',
        Expires: 'Session'
      },
      {
        name: 'sid',
        value: 'cf22d6f160a2a97f62c06bc48a7ec216',
        Expires: 'Session'
      },
      {
        name: 'user1',
        value: 'xh',
        Expires: 'Session'
      },
    ]
    setCookie.forEach(item => {
      document.cookie=`${item.name}=${item.value}; expires=${item.Expires}`;
    })
    /*因为搜索需要cookie 直接设置cookie*/
  }
}
</script>
<style lang="scss">
*{
  padding: 0;
  margin: 0;
}
html,body{
  max-width: 100%;
  background-color: $e-bcg;
}
li{
  list-style: noen;
}
#app{
  max-width: 100%;
}
</style>
